# -*- coding: utf-8 -*-
# Copyright 2017-2019 ControlScan, Inc.
#
# This file is part of Cyphon Engine.
#
# Cyphon Engine is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# Cyphon Engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cyphon Engine. If not, see <http://www.gnu.org/licenses/>.
"""
Serializer for Labels
"""

# third party
from rest_framework import serializers

# local
from . import models


class LabelSerializer(serializers.HyperlinkedModelSerializer):
    """

    """

    class Meta:
        model = models.Label
        fields = ('fields', 'id', 'name', 'url')


class LabelFieldSerializer(serializers.ModelSerializer):
    """

    """

    class Meta:
        model = models.LabelField
        fields = '__all__'
        depth = 1

